package org.ssc.audience.entity;

import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

@Data
public class Audience {
    private int aid;
    @NotBlank(message = "用户名不能为空")
    private String aname;
    @Range(min=16,max=150,message = "注册年龄需大于等于16岁")
    private int age;
    @Pattern(
            regexp = "1(([38]\\d)|(5[^4&&\\d])|(4[579])|(7[0135678]))\\d{8}",
            message = "手机号格式不合法"
    )
    private String phone;
    @Email(message = "email地址不合法")
    private String email;
    @NotBlank(message = "密码不能为空")
    private String password;
    private int state;

}
